package com.hee.erp.modules.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hee.erp.modules.entity.CarModel;
import com.hee.erp.modules.mapper.CarModelMapper;
import com.hee.erp.modules.service.ICarModelService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weizehong
 * @since 2022-05-03
 */
@Service
@Transactional
public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> implements ICarModelService {

    @Override
    public List<CarModel> getListByBrandId(String brandId) {

        LambdaQueryWrapper<CarModel> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CarModel::getBrandId, brandId);
        return this.list(queryWrapper);
    }
}
